<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>所有单据</title>
    <jsp:include page="/static/common/common_header.jsp"></jsp:include>
    <style>
        tr {
            color: #3c3c3c;
            font-family: Arial,"Microsoft YaHei","微软雅黑";
            font-size: 12px;
            font-style: normal;
        }
    </style>
    <script type="text/javascript" src="/static/js/policy/all.js"></script>
</head>
<body>
<table id="temporary_datagrid"></table>
    <form id="temporary_form" method="post">
<div id="temporary_toolbar">
        &nbsp;&nbsp;&nbsp;&nbsp;业务员: <input id="inputUserName" name="inputUser" class="easyui-textbox" style="width:70px">
    &nbsp;&nbsp;投保人: <input id="customerName" type="text" class="easyui-textbox" name="customerName">
    &nbsp;&nbsp;保单编号: <input id="policySn" type="text" class="easyui-textbox" name="policySn">
        <a type="button" class="easyui-linkbutton"
               iconCls="icon-search" plain="true" onclick="searchTemporary();" >查询</a>
</div>
    </form>

<div id="temporary_btns">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="temporary_submit();">保存</a>
    <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancel">取消</a>
</div>
<div id="temporary_dialog">
    <form id="form" method="post">
        <div id="p" class="easyui-panel" style="width: 780px;height: 350px;">
            <div id="aa" class="easyui-accordion" data-options="fit:true,multiple:true,selected:true">
                <div id="accord1" title="投保人" style="overflow:auto;padding:10px;">
                    <table>

                        <!--拿到的保险产品的id-->
                        <input type="hidden" name="customer.id"/>
                        <input type="hidden" name="car.id"/>
                        <%--保单的 id--%>
                        <input type="hidden" name="id" />
                        <tr>
                            <td>姓名</td>
                            <td width="300" height="20px">
                                <input name="customer.name" value="" type="text"/>
                            </td>
                            <td>性别</td>
                            <td width="300">
                                <select name="customer.gender" class="easyui-combobox"
                                        data-options="panelHeight:'auto',width:'50px'">
                                    <option value="1">男</option>
                                    <option value="0">女</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>联系方式</td>
                            <td>
                                <input name="customer.tel" value="" type="text"
                                       class="easyui-validatebox" />
                            </td>
                            <td>身份证</td>
                            <td>
                                <input name="customer.idNo" value="" type="text"
                                       class="easyui-validatebox" />
                            </td>
                        </tr>
                        <tr>
                            <td>通讯地址</td>
                            <td>
                                <input id="inIdCard" name="customer.address" value="" type="text"
                                       class="easyui-validatebox"/>
                            </td>
                        </tr>
                    </table>


                </div>
                <div id="accord2" title="车辆信息" data-options="multiple:true,selected:false" style="padding:10px;">
                    <table>
                        <tr>
                            <td>车主姓名:</td>
                            <td>
                                <input class="easyui-validatebox" type="text" name="car.customer.name" data-options="required:true"/>
                                <input type="hidden" name="car.customer.id"  >
                            </td>
                            <td>品牌</td>
                            <td width="300px" height="20px">
                                <input id="carBrand" name="car.brand" value="" type="text"  />
                            </td>
                            <td>型号</td>
                            <td>
                                <input id="carModel" name="car.model" value="" type="text"  />
                            </td>
                        </tr>
                        <tr>
                            <td>车牌号码</td>
                            <td>
                                <input id="carCarNum" name="car.plateNumber" value="" type="text"
                                       style=" width: 170px"/>
                            </td>
                            <td>排气量</td>
                            <td>
                                <input id="carGasNum" name="car.gasDisplacement" value="" type="text"  />L
                            </td>
                            <td>汽车分类</td>
                            <td>
                                <select class="easyui-combobox" name="car.category" style="width:144px;"
                                        data-options="panelHeight:'auto'">
                                    <option value="1">载客</option>
                                    <option value="2">载物</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>购置日期</td>
                            <td>
                                <input id="purchaseDate" name="car.purchaseDate" value="" type="text" class="easyui-datebox"/>
                            </td>
                            <td>市场估价</td>
                            <td>
                                <input id="carEvaluate" name="car.valuation" value="" type="text"/>
                            </td>
                            <td>车载大小:</td>
                            <td>
                                <select class="easyui-combobox" name="car.size" style="width:144px;"
                                        data-options="panelHeight:'auto'">
                                    <option value="0">小型</option>
                                    <option value="1">中型</option>
                                    <option value="2">大型</option>
                                    <option value="3">超大型</option>
                                </select>
                            </td>
                        </tr>
                    </table>

                </div>
                <div id="accord3" title="保险产品" data-options="multiple:true,selected:false" style="padding:10px;">
                    <table>

                        <tr>

                            <td>保险公司</td>
                            <td>
                                <input id="safe_select" name="safetyMechanism.id" style="width:200px;"/>

                            </td>
                            <td>
                                <a class="easyui-linkbutton"
                                   data-options="iconCls:'icon-add'" data-cmd="add_product">添加产品</a>
                            </td>
                            <td>保险时长</td>
                            <td >
                                <input name="duration" value="" type="number" min="1" onchange="calculate();" style="width: 38px;"/>月
                            </td>
                        </tr>

                        </table>
                    <table>
                        <tr id="hidethis" class="product-tr" data-oid="-1">
                            <td width="60px">保险产品:</td>
                            <td id="productName">防碰瓷险</td>
                            <td width="60px">产品编号:</td>
                            <td id="productSn">5464</td>
                            <td width="60px">保险年费:</td>
                            <td id="annuaFlee" class="annuaFlee">0</td>
                            <td><a class="easyui-linkbutton"
                                   data-options="iconCls:'icon-remove'" onclick="delete_this(this);">删除</a></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td valign="bottom"><font>总计: </font></td>
                            <td valign="bottom"><font color="red" size="10" id="totalAmount">0</font></td>
                            <td valign="bottom"><font>元</font></td>
                        </tr>
                    </table>
                </div>
            </div>

        </div>

    </form>
    <div id="choose_product_dialog">
        <table id="product_datagrid"></table>
    </div>

    <div id="product_btns2">
        <a class="easyui-linkbutton" iconCls="icon-ok" plain="true" data-cmd="select_product">确定</a>
    </div>
</div>

</body>
</html>
